package com.nut.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * 订单标识
 */
public enum OrderTagEnum {

    //订单
    order(10),
    //退款订单
    orderRefund(11)
    ;

    private static Map<Integer, OrderTagEnum> map = new HashMap<>();

    static {
        for (OrderTagEnum tagEnum : OrderTagEnum.values()) {
            map.put(tagEnum.getValue(), tagEnum);
        }
    }

    public static OrderTagEnum valueOf(Integer tag) {
        return map.get(tag);
    }

    private Integer value;

    OrderTagEnum(final Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return this.value;
    }

}
